<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<html>
<head>
    <base href="<%=basePath%>">
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="css/edittable.css"/>
</head>
<body>
<div class="div_title">
    <div class="div_titlename"><img src="images/san_jiao.gif"><span>角色分配  当前用户账号：${admin.adminName}</span></div>
</div>
<form method="post" name="form1" action="RoleServlet.do">
    <input type="hidden" name="id" value="${admin.id}">
    <input type="hidden" name="flag" value="updateAdminRole">
    <table class="edit_table">
      <tr>
          <td>
              用户角色:
          </td>
      </tr>
        <c:forEach var="role" items="${roleList}">
            <tr>
                <td>
                    <input type="radio" name="roleId" value="${role.id}"
                           <c:if test="${admin.roleId==role.id}">checked="checked"</c:if>>${role.roleName}_${role.id}
                </td>
            </tr>
        </c:forEach>

        <tr>
            <td>
                <input class="form_btn" type="submit" value="提交" id="form_btn"/>
                <label id="result_msg" class="result_msg">${msg}</label>
            </td>
        </tr>
    </table>
</form>
</body>
</html>
